<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta content="telephone=no" name="format-detection" /> 
<style>
	body > a:first-child,body > a:first-child img{ width: 0px !important; height: 0px !important; overflow: hidden; position: absolute}
	body{padding-bottom: 0 !important;}
</style>
<meta id="viewport" name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<title>确认订单</title>
<link rel="stylesheet" href="{OSSURL}public/mobile/css/reset.css">
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/greenStyle.css?v=4.80120" />
<link href="{MODULE_URL}public/mobile/css/bootstrap.min.css" rel="stylesheet">
<style>	
#bodyhidden {position: fixed;z-index: 10000;top: 0;width: 100%;height: 100%;background: rgba(0, 0, 0, .15);display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-flex-flow: column;-webkit-flex-direction: column;-ms-flex-direction: column;flex-direction: column;-webkit-transition-property: opacity;-webkit-transition-duration: 100ms;-webkit-backface-visibility: hidden;background: rgba(0, 0, 0, 0.7);}
</style>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>		
{php echo register_jssdk();}
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="{OSSURL}public/mobile/js/PromptBoxUtil.js?v=4.80309"></script>
<style>
.black_overlay{
z-index:1001;
}
</style>
</head>
<body>
    <div id="wrap" class="user_cost">
        <!-- 修改开始 -->
        <section id="cost_list">
            <section class="uncost select">
			       {if !empty($kc1)}
						{if $kc1['type'] ==1}
                        <div class="quan_box click">
                            <a href="#" style="display:block">
                                <dl class="quan_list">
                                    <dt><div style="background-image:url({php echo tomedia($teacher[$kecheng[$kc1['kcid']]['tid']]['thumb']);})"></div>{$teacher[$kecheng[$kc1['kcid']]['tid']]['tname']}</dt>
                                    <dd>{$kecheng[$kc1['kcid']]['name']}</dd>
                                    <dd>￥{$kecheng[$kc1['kcid']]['cose']}</dd>
                                    <dd>{$kecheng[$kc1['kcid']]['adrr']}</dd>
                                    <dd>开始:{php echo date('Y-m-d',$kecheng[$kc1['kcid']]['start'])}</dd>
                                    <dd>结束:{php echo date('Y-m-d',$kecheng[$kc1['kcid']]['end'])}</dd>
                                </dl>
                            </a>
                            <p>请于{php echo date('Y年m月d日',$kecheng[$kc1['kcid']]['start'])}之前缴费哦~</p>
                        </div>
						{else if $kc1['type'] ==4}
                        <div class="quan_box click">
                            <a href="#" style="display:block">
                                <dl class="quan_list">
                                    <dt><div style="background-image:url({php echo tomedia($school['logo']);})"></div></dt>
                                    <dd>报名费</dd>
                                    <dd>￥{$kc1['cose']}</dd>
									<dd>{$school['title']}</dd>
                                </dl>
                            </a>
                            <p>请于您尽快缴费哦~</p>
                        </div>
						{else if $kc1['type'] ==5}
                        <div class="quan_box click">
                            <a href="#" style="display:block">
                                <dl class="quan_list">
                                    <dt><div style="background-image:url({php echo tomedia($school['logo']);})"></div></dt>
                                    <dd>考勤卡费</dd>
									{if $card['cardtime'] ==1}
									<dd>续费时长:{$card['endtime1']}天</dd>
									{else}
									<dd>有效时间:至{php echo date('Y-m-d',$card['endtime2'])}</dd>
									{/if}
                                    <dd>￥{$kc1['cose']}</dd>
									<dd>{$school['title']}</dd>
                                </dl>
                            </a>
                            <p>请于您尽快缴费哦~</p>
                        </div>						
						{else if $kc1['type'] ==3}
                        <div class="quan_box click">
                            <a href="#" style="display:block">
                                <dl class="quan_list">
                                    <dt><div style="background-image:url({php echo tomedia($cost[$kc1['costid']]['icon']);})"></div></dt>
                                    <dd>{$cost[$kc1['costid']]['name']}</dd>
                                    <dd>￥{$cost[$kc1['costid']]['cost']}</dd>
									{if $cost[$kc1['costid']]['is_time'] == 1}
									<dd>有效时间范围:</dd>
                                    <dd>开始:{php echo date('Y-m-d',$cost[$kc1['costid']]['starttime'])}</dd>
                                    <dd>截至:{php echo date('Y-m-d',$cost[$kc1['costid']]['endtime'])}</dd>
									{else}								
									<dd>有效时长:{$cost[$kc1['costid']]['dataline']}天</dd>
									{/if}
                                </dl>
                            </a>
                            <p>请于{php echo date('Y年m月d日',$cost[$kc1['costid']]['starttime'])}之前缴费哦~</p>
                        </div>						
						{/if}
                   	{/if}					
                <article style="z-index:99;margin-top:100px;" id = "gao">
                    <header>
                        <h3>应付费总计</h3>
                    </header>
                    <ul>
					    {php $cose = $kc1['cose']+$kc2['cose']+$kc3['cose']+$kc4['cose']+$kc5['cose'];}	
                        <li>应付金额：<span class='orange' id="lastPrice">￥{$cose}</span></li>
                    </ul>
                    <footer>
                        <p>
                            <input type="checkbox" id="ensure" class="check_ok" checked="checked">
                            <a href="">同意在线收费协议</a>
                        </p>
						<p style="padding-bottom:10px;"></p>									
                        <div id="gopay"><a onclick="zhifu();" style="text-decoration:none;color:#fff;">立即支付</a></div>
                    </footer>
                </article>
            </section>
        </section>
    </div>
	<div class="modal fade" id="pay" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="  margin-top: 60px;    z-index: 11111;">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
					<h4 class="modal-title">支付方式</h4>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<div class="panel">
							<div class="clearfix" style="padding-top:10px;font-size: 100%;">
								<p style="font-size: 16px;">订单编号 :<span class="pull-right">{$od1}</span></p>
								<p style="font-size: 16px;">收款学校 :<span class="pull-right">{$school['title']}</span></p>
								<p style="font-size: 16px;"><strong style="color:red">支付金额 :<span class="pull-right" id="votefee">￥{$kc1['cose']} 元</span></strong></p>

							</div>
						</div>
					</div>				
					<div class="form-group">
						<div class="" style="text-align: center;">
							{if !empty($setting['payment']['wechat']['switch'])}
							<div class="pay-btn" id="wechat-panel">
								<form action="{php echo $this->createMobileUrl('cash', array('paytype'=> 'wechat', 'u_uniacid'=> $uniacid))}" method="post">
									<input type="hidden" name="params" value="{php echo base64_encode(json_encode($params));}" />
									<input type="hidden" name="encrypt_code" value="" />
									<input type="hidden" name="card_id" value="{php echo base64_encode($card_id);}" />
									<input type="hidden" name="coupon_id" value="" />
									<button class="btn btn-success btn-block col-sm-12" disabled="disabled" type="submit" id="wBtn" value="wechat">微信支付(必须使用微信内置浏览器)</button>
								</form>
							</div>
							<script type="text/javascript">
								document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
									$('#wBtn').removeAttr('disabled');
									$('#wBtn').html('微信支付');
								});
							</script>
							{/if}
							{if !empty($setting['payment']['alipay']['switch'])}
							<div class="pay-btn" id="alipay-panel">
								<form action="{php echo $this->createMobileUrl('cash', array('paytype'=> 'alipay', 'u_uniacid'=> $uniacid))}" method="post">
									<input type="hidden" name="params" value="{php echo base64_encode(json_encode($params));}" />
									<input type="hidden" name="encrypt_code" value="" />
									<input type="hidden" name="card_id" value="{php echo base64_encode($card_id);}" />
									<input type="hidden" name="coupon_id" value="" />
									<button class="btn btn-warning btn-block col-sm-12" type="submit" name="alipay">支付宝支付</button>
								</form>
							</div>
							{/if}

							{if $setting['payment']['unionpay']['switch']}
							<div class="pay-btn" id="unionpay-panel">
								<form action="{php echo $this->createMobileUrl('cash', array('paytype'=> 'unionpay', 'u_uniacid'=> $uniacid))}" method="post">
									<input type="hidden" name="params" value="{php echo base64_encode(json_encode($params));}" />
									<input type="hidden" name="encrypt_code" value="" />
									<input type="hidden" name="card_id" value="{php echo base64_encode($card_id);}" />
									<input type="hidden" name="coupon_id" value="" />
									<button class="btn btn-default btn-block col-sm-12" type="submit" name="unionpay">银联支付</button>
								</form>
							</div>
							{/if}

							{if $setting['payment']['baifubao']['switch']}
							<div class="pay-btn" id="baifubao-panel">
								<form action="{php echo $this->createMobileUrl('cash', array('paytype'=> 'baifubao', 'u_uniacid'=> $uniacid))}" method="post">
									<input type="hidden" name="params" value="{php echo base64_encode(json_encode($params));}" />
									<input type="hidden" name="encrypt_code" value="" />
									<input type="hidden" name="card_id" value="{php echo base64_encode($card_id);}" />
									<input type="hidden" name="coupon_id" value="" />
									<button class="btn btn-danger btn-block col-sm-12" type="submit" name="baifubao">百度钱包支付</button>
								</form>
							</div>
							{/if}
							{if !empty($setting['payment']['credit']['switch'])}
							<div class="pay-btn" id="credit-panel">
								<form action="{php echo $this->createMobileUrl('cash', array('paytype'=> 'credit', 'u_uniacid'=> $uniacid))}" method="post">
									<input type="hidden" name="params" value="{php echo base64_encode(json_encode($params));}" />
									<input type="hidden" name="encrypt_code" value="" />
									<input type="hidden" name="card_id" value="{php echo base64_encode($card_id);}" />
									<input type="hidden" name="coupon_id" value="" />
									<button class="btn btn-primary btn-block col-sm-12" type="submit" value="credit">余额支付 （余额支付当前 {php echo sprintf('%.2f', $credtis[$setting['creditbehaviors']['currency']]);}元)</button>
								</form>
							</div>
							{/if}
						</div>
					</div>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
	<div class="modal fade bs-example-modal-sm" id="subsribe" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="  margin-top: 60px;">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title">本订单您已付费</h4>
				</div>
				<div class="modal-body">
					<div class="alert alert-warning text-center" role="alert">已付费订单请勿重复付费<img src="../addons/fm_jiaoyu/public/mobile/img/sucess.png" class="img-rounded" style="width:100%;" /></div>
					<div class="alert alert-info" role="alert"><a href="{php echo $this->createMobileUrl('order', array('schoolid' => $schoolid), true)}" class="btn btn-info" style='color:#fff;width:100%'>返回订单</a></div>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->	
</body>
<!--微信支付相关-->
<div id="bodyhidden" style="display: none;"></div>
<input id="flag" value="{$flag}" type="hidden">
<script>
var PB = new PromptBox();
$(function ($) {
	var flag = $("#flag").val();	
	if (flag == 2) {
		if (cache == "" || cache == null) {
			 $('#pay').modal('show');
			 $("#bodyhidden").show();
		}
	}
});
WeixinJSHideAllNonBaseMenuItem();
function WeixinJSHideAllNonBaseMenuItem(){
	if (typeof wx != "undefined"){
		wx.ready(function () {			
			wx.hideMenuItems({
				menuList: ['menuItem:share:appMessage','menuItem:share:timeline','menuItem:share:qq','menuItem:share:weiboApp','menuItem:favorite','menuItem:share:QZone'] 
			});
		});
	}
}
function zhifu() {
	//$('#pay').modal('toggle');
	 $('#pay').modal('show');
	 $("#bodyhidden").show();
	//$('#pay').modal({backdrop: 'static', keyboard: false});
}
$("#pay").click(function(){
	$("#bodyhidden").hide();
});

	
</script>
</html>